package cn.itsource.basic.service;

import cn.itsource.PetHomeApp;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;


@RunWith(SpringRunner.class)
@SpringBootTest(classes = PetHomeApp.class)
public class SpringbootDataRedisApplicationTests {

    @Autowired
    private RedisTemplate redisTemplate;


    @Test
    public void test() throws Exception {
        redisTemplate.opsForValue().set("name", "zs");

        System.out.println(redisTemplate.opsForValue().get("name"));
    }
}